<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<div class="main row-fluid">
	<div class="row-fluid container" style="margin-top: 5px; margin-bottom:30px">
		<div id="loading-load" style="display: none; text-align: center; color: #834313;">
		</div>
		<div class="project_detail row-fluid" id="tab-part7">
			<div class="span7 detail-left addradius">
				<div style="display: none;" id="project-title-top">
				<h4 id="pre-name" style="font-weight:700;"></h4> 
				<span style="background:#ffaa05;color:#fff;border-radius:2px;margin-right:5px">发起人</span><span id="insti-name"></span>
				<span id="pre-time" class="tip pull-right"></span>
				</div>
			<!-- Tab样式 -->
				<div class="tabbable" id="tabs-42466">
				<ul class="nav nav-pills">
					<li class="active"><a href="#tab-part1" data-toggle="tab" class="detail-tab-home-icon">活动介绍</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="tab-part1">
					<!-- <p>第一部分内容.</p> -->
						<div class="row-fluid">
							<div id="projectCover">
								<div class="laoding-round" style="margin-top: 200px;"></div>
							</div>
							<ul class="introduce-div">
								<table class="table">
									<tbody>
										<tr>
											<td>
												<li class="start-project" id="shareTo">分享服务 <br>
													<i style="cursor: pointer;" class="start-project-img"></i>
												</li>
											</td>
											<td>
												<!-- <li class="attention-project">关注服务 <br> 
													<i style="cursor: pointer;" class="attention-project-img">							
												</i>
												</li> -->
											</td>
											<td>
												<a href="#comment">
													<li class="con-project">评论服务<br> 
														<i class="con-project-img"></i>
													</li>
												</a>
											</td>
										</tr>
									</tbody>
								</table>
							</ul>
							<ul class="introduce-ul">
								<li><div id="introduceProject"></div></li>								
							</ul>
						</div>
					</div>
				</div>
				</div>
			</div>
			<div class="span5 info detail-right preferential-discuss">
				<div class="tabbable" id="tabs-discuss">
					<div class="tab-content">
						<div class="tab-pane active" id="tab-part2">
							<div class="row-fluid">
								<ul style="margin-left:0;">
									<li><h4>大家的讨论</h4></li>
									<li class="discuss-li1"><span>全部</span></li>
									<li id="discussAll">
										<!--<div class="laoding-round"></div>-->
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
	</div>
</div>

<a href="#top" class="back_to_top" style="display: none;"></a>


<!--分享div-->
<div class="share">
	<table class="table">
		<thead>
			<tr>
				<th class="color_theme"
				style="text-align: left; line-height: 20px;">
				分享到:<i class="close_share"></i></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>
					<div class="bdsharebuttonbox">
						<a href="#" class="sina-share" data-cmd="tsina" title="分享到新浪微博"></a><a
						href="#" class="yy-share" data-cmd="renren" title="分享到人人网"></a><a
						href="#" class="tencent-share" data-cmd="qzone" title="分享到QQ空间"></a><a
						href="#" class="txweb-share" data-cmd="tqq" title="分享到腾讯微博"></a><a
						href="#" class="douban-share" data-cmd="douban" title="分享到豆瓣"></a><a
						href="#" class="friend-share" data-cmd="tqf" title="分享到腾讯朋友圈"></a>
					</div>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<!--封面图片-->
<script type="text/html" id="projectCover-template">
<div class="img-box"><img src="<$=preferential.photoUrl$>/500x500/" alt="" width="100%"/></div>
</script>


<script type="text/html" id="introduceProject-template">
<li><h4>活动简介</h4></li>
<li >
<$==preferential.description$>
</li>
<li><h4>活动详情</h4></li>
<li class="description-li">
<$==preferential.activityBackground$>
</li>
</script>

<!-- 大家的讨论 -->
<script type="text/html" id="discussAll-template">
<$for(var i = 0;i<result.length;i++){$>
		<table class="table">
			<tbody class="" style="border-bottom: 1px solid rgb(204, 204, 204);">
			<$if(result[i].superId==null){$>
				<tr>
					<td rowspan="3" style="width: 60px; height: 60px;position:relative">
						<a style="padding:0px" href="${ctx }/home?id=<$=result[i].userId$>">
							<div class="user_info message-user-pic">
								<img style="display:block;width: 60px; height: 60px;border:1px solid #C0C0C0;" src="<$=result[i].userAttachment$>/60x60" alt="40*40"  title="<$=result[i].userName$>" />
							</div>
						</a>
					</td>
				</tr>
				<tr>
					<td colspan="6" style="text-align:botton;font-size:14px;">
						<a class="color_theme" href="${ctx }/home?id=<$=result[i].userId$>">
							<$if(result[i].userRole=='institution'){$>
								<i class="institution-icon" ></i>
						<$}$>
							<$=result[i].userName$>
						</a>
						<i></i>：
						<span style="word-break:break-all;width:auto;"><$=result[i].userContent$></span>
					</td>
				</tr>
				<tr>
					<td colspan="6" style="text-align: right;">
						<input type="hidden" value="<$=result[i].id$>">
						<span class="send_time color_theme" data="<$=result[i].userContent$>"><$=result[i].userCreatedDate$></span>
						<span class="chart color_theme returnMessage" data='{<$=result[i].userId$>,<$=result[i].id$>}'>回复</span> 
						<span class="del_to_list color_theme" data='<$=result[i].id $>'>删除</span>
					</td>
				</tr>
			<$} else{$>
				<tr>
					<td rowspan="3" style="width: 60px; height: 60px;position:relative">
						<a style="padding:0px" href="${ctx }/home?id=<$=result[i].userId$>">
							<div class="message-user-pic">
								<img style="width: 60px; height: 60px;border:1px solid #C0C0C0;" src="<$=result[i].userAttachment$>/60x60" alt="40*40" title="<$=result[i].userName$>" />
							</div>
						</a>
					</td>

				</tr>
				<tr>
					<td colspan="6" style="text-align:botton;font-size:14px;">
						<a class="color_theme" href="${ctx }/home?id=<$=result[i].userId$>">
						<$if(result[i].userRole=='institution'){$>
							<i class="institution-icon" ></i>
						<$}$>
							<$=result[i].userName$>
						</a>
						<span>回复：</span>
						<a class="color_theme" href="${ctx }/home?id=<$=result[i].superId$>">
							<span class="color_theme">
							<$if(result[i].superRole=='institution'){$>
								<i class="institution-icon" ></i>
							<$}$>
								<$=result[i].superName$>
								<span style="word-break:break-all;width:auto;">(“<$=result[i].superContent$>”)</span>
							</span>
						</a>
						<span style="word-break:break-all;width:91%;"><$=result[i].userContent$><span>
					</td>
				</tr>
				<tr>
					<td colspan="6" style="text-align: right;">
						<input type="hidden" value="<$=result[i].id$>">
						<span class="send_time color_theme" data="<$=result[i].userContent$>"><$=result[i].userCreatedDate$></span>
						<span class="chart color_theme returnMessage" data={<$=result[i].userId$>,<$=result[i].id$>}>回复</span> 
						<span class="del_to_list color_theme" data='<$=result[i].id $>'>删除</span>
					</td>
				</tr>
			<$}$>
			</tbody>
		</table>
<$}$>
<$ if ( totalPages > 1 ) { $>
	<div class="pagination">
		<$==pagination$>
	</div>
<$ } $>
</script>

<!-- 获取公告 -->
<script type="text/html" id="getAd-template">
<h4 >[公告]<$=title$></h4><$if(content!=null){$>
<div class="post-li1">
<span class="user_name" style="float:left;margin-right:10px;"></span>
<p class="ad_time" id="ad_time"> <$=createdDate$></p>
</div>
<div class="post-li2" id="project-ad">
<p style="text-indent:30px;"><$print(content+"")$></p>
</div><$}else{$>
 <div class="empty-center">暂时没有公告</div>
<!--
<div class="post-li3">
<i id="check-all-ad" class="color_theme">查看全文&gt;</i> 共有
<h> 8 </h>
个回应
</div>
-->
<$}$>
</script>

<c:if test="${env == 'production' }">
<script type="text/javascript">
	seajs.use("${ctx}/assets/js-dist/project/preferential-preview-page");
	seajs.use("${ctx}/assets/js-dist/util/share");
</script>
</c:if>
<c:if test="${env != 'production' }">
<script type="text/javascript">
	seajs.use("${ctx}/assets/js/project/preferential-preview-page");
	seajs.use("${ctx}/assets/js/util/share");
</script>
</c:if>
